	<table>
		<thead>
			<tr>
				<th width="20"><?php echo form_checkbox(array('name' => 'action_to_all', 'class' => 'check-all')); ?></th>
				<th><?php echo lang('escort_be_discount_discount_code_label'); ?></th>
				<th class="collapse"><?php echo lang('escort_be_discount_discount_type_label'); ?></th>
				<th class="collapse"><?php echo lang('escort_be_discount_description_label'); ?></th>
				<th class="collapse"><?php echo lang('escort_be_discount_time_used_label'); ?></th>
				<th width="180"></th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="7">
					<div class="inner"><?php $this->load->view('admin/partials/pagination'); ?></div>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<?php foreach ($discounts as $discount) : ?>
				<tr>
					<td><?php echo form_checkbox('action_to[]', $discount->discount_code); ?></td>
					<td><?php echo $discount->discount_code; ?></td>
					<td>
					<?php
					foreach ($discountTypeList as $key => $value) {
						if($discount->discount_type_code == $key){
							echo $value;
						}
					} 
					?>					
					</td>
					<td><?php echo $discount->description; ?></td>
					<td>
					<?php
						if($discount->used_time){
					 		echo $discount->used_time;
						}else{
							echo 0;
						} 
					 ?>
					</td>
					
					<td>
						<?php echo anchor('admin/be_discount/edit/' . $discount->discount_code, lang('global:edit'), 'class="btn orange edit"'); ?>
						<?php echo anchor('admin/be_discount/delete/' . $discount->discount_code, lang('global:delete'), array('class'=>'confirm btn red delete')); ?>
					</td>
				</tr>
			<?php endforeach; ?>
		</tbody>
	</table>

	<div class="table_action_buttons">
		<?php $this->load->view('admin/partials/buttons', array('buttons' => array('delete', 'active'))); ?>
	</div>